<?php
$tdatapacking_lists=array();
	$tdatapacking_lists[".NumberOfChars"]=80; 
	$tdatapacking_lists[".ShortName"]="packing_lists";
	$tdatapacking_lists[".OwnerID"]="";
	$tdatapacking_lists[".OriginalTable"]="packing_lists";


	
//	field labels
$fieldLabelspacking_lists = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelspacking_lists["English"]=array();
	$fieldToolTipspacking_lists["English"]=array();
	$fieldLabelspacking_lists["English"]["id"] = "Id";
	$fieldToolTipspacking_lists["English"]["id"] = "";
	$fieldLabelspacking_lists["English"]["place"] = "Place";
	$fieldToolTipspacking_lists["English"]["place"] = "";
	$fieldLabelspacking_lists["English"]["shipment_date"] = "Shipment Date";
	$fieldToolTipspacking_lists["English"]["shipment_date"] = "";
	$fieldLabelspacking_lists["English"]["buyer_id"] = "Buyer";
	$fieldToolTipspacking_lists["English"]["buyer_id"] = "";
	$fieldLabelspacking_lists["English"]["name"] = "Prepared by";
	$fieldToolTipspacking_lists["English"]["name"] = "";
	$fieldLabelspacking_lists["English"]["order_no"] = "Order No";
	$fieldToolTipspacking_lists["English"]["order_no"] = "";
	$fieldLabelspacking_lists["English"]["consignee_id"] = "Consignee";
	$fieldToolTipspacking_lists["English"]["consignee_id"] = "";
	$fieldLabelspacking_lists["English"]["shipment_pack_details"] = "Shipment Pack Details";
	$fieldToolTipspacking_lists["English"]["shipment_pack_details"] = "";
	$fieldLabelspacking_lists["English"]["marks"] = "Marks";
	$fieldToolTipspacking_lists["English"]["marks"] = "";
	$fieldLabelspacking_lists["English"]["ref_id"] = "Select Proforma No";
	$fieldToolTipspacking_lists["English"]["ref_id"] = "";
	$fieldLabelspacking_lists["English"]["buyer_address"] = "Buyer Address";
	$fieldToolTipspacking_lists["English"]["buyer_address"] = "";
	$fieldLabelspacking_lists["English"]["consignee_address"] = "Consignee Address";
	$fieldToolTipspacking_lists["English"]["consignee_address"] = "";
	if (count($fieldToolTipspacking_lists["English"])){
		$tdatapacking_lists[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["place"] = "Place";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["place"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["shipment_date"] = "Shipment Date";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["shipment_date"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["buyer_id"] = "Buyer Id";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["buyer_id"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["name"] = "Name";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["name"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["order_no"] = "Order No";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["order_no"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["consignee_id"] = "Consignee Id";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["consignee_id"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["shipment_pack_details"] = "Shipment Pack Details";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["shipment_pack_details"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["marks"] = "Marks";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["marks"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["ref_id"] = "Ref Id";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["ref_id"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["buyer_address"] = "Buyer Address";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["buyer_address"] = "";
	$fieldLabelspacking_lists["Chinese (Hong Kong S.A.R.)"]["consignee_address"] = "Consignee Address";
	$fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"]["consignee_address"] = "";
	if (count($fieldToolTipspacking_lists["Chinese (Hong Kong S.A.R.)"])){
		$tdatapacking_lists[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelspacking_lists["Chinese (Taiwan)"]=array();
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]=array();
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["place"] = "Place";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["place"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["shipment_date"] = "Shipment Date";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["shipment_date"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["buyer_id"] = "Buyer Id";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["buyer_id"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["name"] = "Name";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["name"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["order_no"] = "Order No";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["order_no"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["consignee_id"] = "Consignee Id";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["consignee_id"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["shipment_pack_details"] = "Shipment Pack Details";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["shipment_pack_details"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["marks"] = "Marks";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["marks"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["ref_id"] = "Ref Id";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["ref_id"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["buyer_address"] = "Buyer Address";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["buyer_address"] = "";
	$fieldLabelspacking_lists["Chinese (Taiwan)"]["consignee_address"] = "Consignee Address";
	$fieldToolTipspacking_lists["Chinese (Taiwan)"]["consignee_address"] = "";
	if (count($fieldToolTipspacking_lists["Chinese (Taiwan)"])){
		$tdatapacking_lists[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelspacking_lists["French"]=array();
	$fieldToolTipspacking_lists["French"]=array();
	$fieldLabelspacking_lists["French"]["id"] = "Id";
	$fieldToolTipspacking_lists["French"]["id"] = "";
	$fieldLabelspacking_lists["French"]["place"] = "Place";
	$fieldToolTipspacking_lists["French"]["place"] = "";
	$fieldLabelspacking_lists["French"]["shipment_date"] = "Shipment Date";
	$fieldToolTipspacking_lists["French"]["shipment_date"] = "";
	$fieldLabelspacking_lists["French"]["buyer_id"] = "Buyer Id";
	$fieldToolTipspacking_lists["French"]["buyer_id"] = "";
	$fieldLabelspacking_lists["French"]["name"] = "Name";
	$fieldToolTipspacking_lists["French"]["name"] = "";
	$fieldLabelspacking_lists["French"]["order_no"] = "Order No";
	$fieldToolTipspacking_lists["French"]["order_no"] = "";
	$fieldLabelspacking_lists["French"]["consignee_id"] = "Consignee Id";
	$fieldToolTipspacking_lists["French"]["consignee_id"] = "";
	$fieldLabelspacking_lists["French"]["shipment_pack_details"] = "Shipment Pack Details";
	$fieldToolTipspacking_lists["French"]["shipment_pack_details"] = "";
	$fieldLabelspacking_lists["French"]["marks"] = "Marks";
	$fieldToolTipspacking_lists["French"]["marks"] = "";
	$fieldLabelspacking_lists["French"]["ref_id"] = "Ref Id";
	$fieldToolTipspacking_lists["French"]["ref_id"] = "";
	$fieldLabelspacking_lists["French"]["buyer_address"] = "Buyer Address";
	$fieldToolTipspacking_lists["French"]["buyer_address"] = "";
	$fieldLabelspacking_lists["French"]["consignee_address"] = "Consignee Address";
	$fieldToolTipspacking_lists["French"]["consignee_address"] = "";
	if (count($fieldToolTipspacking_lists["French"])){
		$tdatapacking_lists[".isUseToolTips"]=true;
	}
}


	
	$tdatapacking_lists[".NCSearch"]=true;

	

$tdatapacking_lists[".shortTableName"] = "packing_lists";
$tdatapacking_lists[".nSecOptions"] = 0;
$tdatapacking_lists[".recsPerRowList"] = 1;	
$tdatapacking_lists[".tableGroupBy"] = "0";
$tdatapacking_lists[".mainTableOwnerID"] = "";
$tdatapacking_lists[".moveNext"] = 1;




$tdatapacking_lists[".showAddInPopup"] = false;

$tdatapacking_lists[".showEditInPopup"] = false;

$tdatapacking_lists[".showViewInPopup"] = false;


$tdatapacking_lists[".fieldsForRegister"] = array();

$tdatapacking_lists[".listAjax"] = true;

	$tdatapacking_lists[".audit"] = false;

	$tdatapacking_lists[".locking"] = false;
	
$tdatapacking_lists[".listIcons"] = true;
$tdatapacking_lists[".edit"] = true;
$tdatapacking_lists[".inlineEdit"] = true;
$tdatapacking_lists[".copy"] = true;
$tdatapacking_lists[".view"] = true;

$tdatapacking_lists[".exportTo"] = true;

$tdatapacking_lists[".printFriendly"] = true;

$tdatapacking_lists[".delete"] = true;

$tdatapacking_lists[".showSimpleSearchOptions"] = true;

$tdatapacking_lists[".showSearchPanel"] = true;


$tdatapacking_lists[".isUseAjaxSuggest"] = true;

$tdatapacking_lists[".rowHighlite"] = true;


// button handlers file names

$tdatapacking_lists[".addPageEvents"] = true;

$tdatapacking_lists[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatapacking_lists[".isUseCalendarForSearch"] = true;

// use timepicker for search panel
$tdatapacking_lists[".isUseTimeForSearch"] = false;

$tdatapacking_lists[".isUseiBox"] = false;


$tdatapacking_lists[".useDetailsPreview"] = true;	

$tdatapacking_lists[".isUseInlineAdd"] = true;

$tdatapacking_lists[".isUseInlineEdit"] = true;
$tdatapacking_lists[".isUseInlineJs"] = $tdatapacking_lists[".isUseInlineAdd"] || $tdatapacking_lists[".isUseInlineEdit"];

$tdatapacking_lists[".allSearchFields"] = array();

$tdatapacking_lists[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "id";	
}
$tdatapacking_lists[".globSearchFields"][] = "ref_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ref_id", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "ref_id";	
}
$tdatapacking_lists[".globSearchFields"][] = "buyer_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer_id", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "buyer_id";	
}
$tdatapacking_lists[".globSearchFields"][] = "buyer_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer_address", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "buyer_address";	
}
$tdatapacking_lists[".globSearchFields"][] = "consignee_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("consignee_id", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "consignee_id";	
}
$tdatapacking_lists[".globSearchFields"][] = "consignee_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("consignee_address", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "consignee_address";	
}
$tdatapacking_lists[".globSearchFields"][] = "name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("name", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "name";	
}
$tdatapacking_lists[".globSearchFields"][] = "place";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("place", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "place";	
}
$tdatapacking_lists[".globSearchFields"][] = "shipment_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("shipment_date", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "shipment_date";	
}
$tdatapacking_lists[".globSearchFields"][] = "order_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("order_no", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "order_no";	
}
$tdatapacking_lists[".globSearchFields"][] = "shipment_pack_details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("shipment_pack_details", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "shipment_pack_details";	
}
$tdatapacking_lists[".globSearchFields"][] = "marks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("marks", $tdatapacking_lists[".allSearchFields"]))
{
	$tdatapacking_lists[".allSearchFields"][] = "marks";	
}


$tdatapacking_lists[".googleLikeFields"][] = "id";
$tdatapacking_lists[".googleLikeFields"][] = "ref_id";
$tdatapacking_lists[".googleLikeFields"][] = "buyer_id";
$tdatapacking_lists[".googleLikeFields"][] = "buyer_address";
$tdatapacking_lists[".googleLikeFields"][] = "consignee_id";
$tdatapacking_lists[".googleLikeFields"][] = "consignee_address";
$tdatapacking_lists[".googleLikeFields"][] = "name";
$tdatapacking_lists[".googleLikeFields"][] = "place";
$tdatapacking_lists[".googleLikeFields"][] = "shipment_date";
$tdatapacking_lists[".googleLikeFields"][] = "order_no";
$tdatapacking_lists[".googleLikeFields"][] = "shipment_pack_details";
$tdatapacking_lists[".googleLikeFields"][] = "marks";



$tdatapacking_lists[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "id";	
}
$tdatapacking_lists[".advSearchFields"][] = "ref_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ref_id", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "ref_id";	
}
$tdatapacking_lists[".advSearchFields"][] = "buyer_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer_id", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "buyer_id";	
}
$tdatapacking_lists[".advSearchFields"][] = "buyer_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("buyer_address", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "buyer_address";	
}
$tdatapacking_lists[".advSearchFields"][] = "consignee_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("consignee_id", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "consignee_id";	
}
$tdatapacking_lists[".advSearchFields"][] = "consignee_address";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("consignee_address", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "consignee_address";	
}
$tdatapacking_lists[".advSearchFields"][] = "name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("name", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "name";	
}
$tdatapacking_lists[".advSearchFields"][] = "place";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("place", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "place";	
}
$tdatapacking_lists[".advSearchFields"][] = "shipment_date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("shipment_date", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "shipment_date";	
}
$tdatapacking_lists[".advSearchFields"][] = "order_no";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("order_no", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "order_no";	
}
$tdatapacking_lists[".advSearchFields"][] = "shipment_pack_details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("shipment_pack_details", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "shipment_pack_details";	
}
$tdatapacking_lists[".advSearchFields"][] = "marks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("marks", $tdatapacking_lists[".allSearchFields"])) 
{
	$tdatapacking_lists[".allSearchFields"][] = "marks";	
}

$tdatapacking_lists[".isTableType"] = "list";


	

$tdatapacking_lists[".isDisplayLoading"] = true;

$tdatapacking_lists[".isResizeColumns"] = false;

	$tdatapacking_lists[".subQueriesSupAccess"] = true;




$tdatapacking_lists[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatapacking_lists[".strOrderBy"] = $gstrOrderBy;
	
$tdatapacking_lists[".orderindexes"] = array();

$tdatapacking_lists[".sqlHead"] = "SELECT id,  place,  shipment_date,  buyer_id,  name,  order_no,  consignee_id,  shipment_pack_details,  marks,  ref_id,  \"\" AS buyer_address,  \"\" AS consignee_address";
$tdatapacking_lists[".sqlFrom"] = "FROM packing_lists";
$tdatapacking_lists[".sqlWhereExpr"] = "";
$tdatapacking_lists[".sqlTail"] = "";

//fill array of tabs for edit page
$arrEditTabs = array();
	$tabFields = array();
	$tabFields[]="ref_id";
$arrEditTabs[] = array('tabId'=>'Proforma1',
					   'tabName'=>"Proforma",
					   'nType'=>'1',
					   'nOrder'=>1,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[]="buyer_id";
	$tabFields[]="buyer_address";
	$tabFields[]="consignee_id";
	$tabFields[]="consignee_address";
$arrEditTabs[] = array('tabId'=>'Companies1',
					   'tabName'=>"Companies",
					   'nType'=>'1',
					   'nOrder'=>3,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[]="name";
	$tabFields[]="place";
	$tabFields[]="shipment_date";
	$tabFields[]="order_no";
	$tabFields[]="shipment_pack_details";
	$tabFields[]="marks";
$arrEditTabs[] = array('tabId'=>'Commercial1',
					   'tabName'=>"Commercial",
					   'nType'=>'1',
					   'nOrder'=>8,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
$tdatapacking_lists[".arrEditTabs"] = $arrEditTabs;

//fill array of tabs for add page
$arrAddTabs = array();
	$tabFields = array();
	$tabFields[] = "ref_id";
$arrAddTabs[] = array('tabId'=>'Proforma1',
					  'tabName'=>"Proforma",
					  'nType'=>'1',
					  'nOrder'=>1,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "buyer_id";
	$tabFields[] = "buyer_address";
	$tabFields[] = "consignee_id";
	$tabFields[] = "consignee_address";
$arrAddTabs[] = array('tabId'=>'Companies1',
					  'tabName'=>"Companies",
					  'nType'=>'1',
					  'nOrder'=>3,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "name";
	$tabFields[] = "place";
	$tabFields[] = "shipment_date";
	$tabFields[] = "order_no";
	$tabFields[] = "shipment_pack_details";
	$tabFields[] = "marks";
$arrAddTabs[] = array('tabId'=>'Commercial1',
					  'tabName'=>"Commercial",
					  'nType'=>'1',
					  'nOrder'=>8,
					  'tabGroup'=>0,
					  'arrFields'=> $tabFields,
					  'expandSec'=>1);
$tdatapacking_lists[".arrAddTabs"] = $arrAddTabs;

//fill array of tabs for view page
$arrViewTabs = array();
	$tabFields = array();
	$tabFields[] = "ref_id";
$arrViewTabs[] = array('tabId'=>'Proforma1',
					   'tabName'=>"Proforma",
					   'nType'=>'1',
					   'nOrder'=>2,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "buyer_id";
	$tabFields[] = "buyer_address";
	$tabFields[] = "consignee_id";
	$tabFields[] = "consignee_address";
$arrViewTabs[] = array('tabId'=>'Companies1',
					   'tabName'=>"Companies",
					   'nType'=>'1',
					   'nOrder'=>4,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
	$tabFields = array();
	$tabFields[] = "name";
	$tabFields[] = "place";
	$tabFields[] = "shipment_date";
	$tabFields[] = "order_no";
	$tabFields[] = "shipment_pack_details";
	$tabFields[] = "marks";
$arrViewTabs[] = array('tabId'=>'Commercial1',
					   'tabName'=>"Commercial",
					   'nType'=>'1',
					   'nOrder'=>9,
					   'tabGroup'=>0,
					   'arrFields'=> $tabFields,
					   'expandSec'=>1);
$tdatapacking_lists[".arrViewTabs"] = $arrViewTabs;

//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatapacking_lists[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatapacking_lists[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatapacking_lists[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["id"]=$fdata;
//	place
	$fdata = array();
	$fdata["strName"] = "place";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Place"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="city_name";
				$fdata["LookupTable"]="cities";
	$fdata["LookupOrderBy"]="city_name";
																$fdata["AllowToAdd"]=true; 
				
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "place";
	
		$fdata["FullName"]= "place";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["place"]=$fdata;
//	shipment_date
	$fdata = array();
	$fdata["strName"] = "shipment_date";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Shipment Date"; 
	
		
		
	$fdata["FieldType"]= 7;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "shipment_date";
	
		$fdata["FullName"]= "shipment_date";
	
		
		
		
		
		
				$fdata["Index"]= 3;
		$fdata["DateEditType"] = 13; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["shipment_date"]=$fdata;
//	buyer_id
	$fdata = array();
	$fdata["strName"] = "buyer_id";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Buyer"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"buyer_address", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Buyer'";
													
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "buyer_id";
	
		$fdata["FullName"]= "buyer_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["buyer_id"]=$fdata;
//	name
	$fdata = array();
	$fdata["strName"] = "name";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Prepared by"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "name";
	
		$fdata["FullName"]= "name";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["name"]=$fdata;
//	order_no
	$fdata = array();
	$fdata["strName"] = "order_no";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Order No"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "order_no";
	
		$fdata["FullName"]= "order_no";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["order_no"]=$fdata;
//	consignee_id
	$fdata = array();
	$fdata["strName"] = "consignee_id";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Consignee"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"consignee_address", 'lookupF'=>"full_addr");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="company_name";
				$fdata["LookupTable"]="company_addresses";
	$fdata["LookupOrderBy"]="company_name";
							$fdata["LookupWhere"] = "category='Buyer'";
													
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "consignee_id";
	
		$fdata["FullName"]= "consignee_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 7;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["consignee_id"]=$fdata;
//	shipment_pack_details
	$fdata = array();
	$fdata["strName"] = "shipment_pack_details";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Shipment Pack Details"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "shipment_pack_details";
	
		$fdata["FullName"]= "shipment_pack_details";
	
		
		
		
		
		
				$fdata["Index"]= 8;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["shipment_pack_details"]=$fdata;
//	marks
	$fdata = array();
	$fdata["strName"] = "marks";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Marks"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "marks";
	
		$fdata["FullName"]= "marks";
	
		
		
		
		
		
				$fdata["Index"]= 9;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["marks"]=$fdata;
//	ref_id
	$fdata = array();
	$fdata["strName"] = "ref_id";
	$fdata["ownerTable"] = "packing_lists";
		$fdata["Label"]="Select Proforma No"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
	$fdata["autoCompleteFields"][] = array('masterF'=>"buyer_id", 'lookupF'=>"buyer_id");
	$fdata["autoCompleteFields"][] = array('masterF'=>"consignee_id", 'lookupF'=>"consignee_id");
										$fdata["LinkField"]="id";
	$fdata["LinkFieldType"]=3;
	$fdata["DisplayField"]="proforma_invoice_no";
				$fdata["LookupTable"]="proforma_invoices";
	$fdata["LookupOrderBy"]="proforma_invoice_no";
																			
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ref_id";
	
		$fdata["FullName"]= "ref_id";
	
		
		
		
		
		
				$fdata["Index"]= 10;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["ref_id"]=$fdata;
//	buyer_address
	$fdata = array();
	$fdata["strName"] = "buyer_address";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Buyer Address"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "buyer_address";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 11;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["buyer_address"]=$fdata;
//	consignee_address
	$fdata = array();
	$fdata["strName"] = "consignee_address";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Consignee Address"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "consignee_address";
	
		$fdata["FullName"]= "\"\"";
	
		
		
		
		
		
				$fdata["Index"]= 12;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapacking_lists["consignee_address"]=$fdata;

	
$tables_data["packing_lists"]=&$tdatapacking_lists;
$field_labels["packing_lists"] = &$fieldLabelspacking_lists;
$fieldToolTips["packing_lists"] = &$fieldToolTipspacking_lists;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["packing_lists"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="packing_list_items";
	$detailsTablesData["packing_lists"][$dIndex] = array(
		  "dDataSourceTable"=>"packing_list_items"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"packing_list_items"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT id,   packing_list_id,   package_no,   gross_weight,   legal_weight,   net_weight,   height,   width,   length,   quantity,   description"	
		, "sqlFrom"=>"FROM packing_list_items"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 1
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$detailsTablesData["packing_lists"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["packing_lists"][$dIndex]["detailKeys"][]="packing_list_id";


	
// tables which are master tables for current table (detail)
$masterTablesData["packing_lists"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto106=array();
$proto106["m_strHead"] = "SELECT";
$proto106["m_strFieldList"] = "id,  place,  shipment_date,  buyer_id,  name,  order_no,  consignee_id,  shipment_pack_details,  marks,  ref_id,  \"\" AS buyer_address,  \"\" AS consignee_address";
$proto106["m_strFrom"] = "FROM packing_lists";
$proto106["m_strWhere"] = "";
$proto106["m_strOrderBy"] = "";
$proto106["m_strTail"] = "";
$proto107=array();
$proto107["m_sql"] = "";
$proto107["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto107["m_column"]=$obj;
$proto107["m_contained"] = array();
$proto107["m_strCase"] = "";
$proto107["m_havingmode"] = "0";
$proto107["m_inBrackets"] = "0";
$proto107["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto107);

$proto106["m_where"] = $obj;
$proto109=array();
$proto109["m_sql"] = "";
$proto109["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto109["m_column"]=$obj;
$proto109["m_contained"] = array();
$proto109["m_strCase"] = "";
$proto109["m_havingmode"] = "0";
$proto109["m_inBrackets"] = "0";
$proto109["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto109);

$proto106["m_having"] = $obj;
$proto106["m_fieldlist"] = array();
						$proto111=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "packing_lists"
));

$proto111["m_expr"]=$obj;
$proto111["m_alias"] = "";
$obj = new SQLFieldListItem($proto111);

$proto106["m_fieldlist"][]=$obj;
						$proto113=array();
			$obj = new SQLField(array(
	"m_strName" => "place",
	"m_strTable" => "packing_lists"
));

$proto113["m_expr"]=$obj;
$proto113["m_alias"] = "";
$obj = new SQLFieldListItem($proto113);

$proto106["m_fieldlist"][]=$obj;
						$proto115=array();
			$obj = new SQLField(array(
	"m_strName" => "shipment_date",
	"m_strTable" => "packing_lists"
));

$proto115["m_expr"]=$obj;
$proto115["m_alias"] = "";
$obj = new SQLFieldListItem($proto115);

$proto106["m_fieldlist"][]=$obj;
						$proto117=array();
			$obj = new SQLField(array(
	"m_strName" => "buyer_id",
	"m_strTable" => "packing_lists"
));

$proto117["m_expr"]=$obj;
$proto117["m_alias"] = "";
$obj = new SQLFieldListItem($proto117);

$proto106["m_fieldlist"][]=$obj;
						$proto119=array();
			$obj = new SQLField(array(
	"m_strName" => "name",
	"m_strTable" => "packing_lists"
));

$proto119["m_expr"]=$obj;
$proto119["m_alias"] = "";
$obj = new SQLFieldListItem($proto119);

$proto106["m_fieldlist"][]=$obj;
						$proto121=array();
			$obj = new SQLField(array(
	"m_strName" => "order_no",
	"m_strTable" => "packing_lists"
));

$proto121["m_expr"]=$obj;
$proto121["m_alias"] = "";
$obj = new SQLFieldListItem($proto121);

$proto106["m_fieldlist"][]=$obj;
						$proto123=array();
			$obj = new SQLField(array(
	"m_strName" => "consignee_id",
	"m_strTable" => "packing_lists"
));

$proto123["m_expr"]=$obj;
$proto123["m_alias"] = "";
$obj = new SQLFieldListItem($proto123);

$proto106["m_fieldlist"][]=$obj;
						$proto125=array();
			$obj = new SQLField(array(
	"m_strName" => "shipment_pack_details",
	"m_strTable" => "packing_lists"
));

$proto125["m_expr"]=$obj;
$proto125["m_alias"] = "";
$obj = new SQLFieldListItem($proto125);

$proto106["m_fieldlist"][]=$obj;
						$proto127=array();
			$obj = new SQLField(array(
	"m_strName" => "marks",
	"m_strTable" => "packing_lists"
));

$proto127["m_expr"]=$obj;
$proto127["m_alias"] = "";
$obj = new SQLFieldListItem($proto127);

$proto106["m_fieldlist"][]=$obj;
						$proto129=array();
			$obj = new SQLField(array(
	"m_strName" => "ref_id",
	"m_strTable" => "packing_lists"
));

$proto129["m_expr"]=$obj;
$proto129["m_alias"] = "";
$obj = new SQLFieldListItem($proto129);

$proto106["m_fieldlist"][]=$obj;
						$proto131=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto131["m_expr"]=$obj;
$proto131["m_alias"] = "buyer_address";
$obj = new SQLFieldListItem($proto131);

$proto106["m_fieldlist"][]=$obj;
						$proto133=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "\"\""
));

$proto133["m_expr"]=$obj;
$proto133["m_alias"] = "consignee_address";
$obj = new SQLFieldListItem($proto133);

$proto106["m_fieldlist"][]=$obj;
$proto106["m_fromlist"] = array();
												$proto135=array();
$proto135["m_link"] = "SQLL_MAIN";
			$proto136=array();
$proto136["m_strName"] = "packing_lists";
$proto136["m_columns"] = array();
$proto136["m_columns"][] = "id";
$proto136["m_columns"][] = "place";
$proto136["m_columns"][] = "shipment_date";
$proto136["m_columns"][] = "buyer_id";
$proto136["m_columns"][] = "name";
$proto136["m_columns"][] = "order_no";
$proto136["m_columns"][] = "consignee_id";
$proto136["m_columns"][] = "shipment_pack_details";
$proto136["m_columns"][] = "marks";
$proto136["m_columns"][] = "ref_id";
$obj = new SQLTable($proto136);

$proto135["m_table"] = $obj;
$proto135["m_alias"] = "";
$proto137=array();
$proto137["m_sql"] = "";
$proto137["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto137["m_column"]=$obj;
$proto137["m_contained"] = array();
$proto137["m_strCase"] = "";
$proto137["m_havingmode"] = "0";
$proto137["m_inBrackets"] = "0";
$proto137["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto137);

$proto135["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto135);

$proto106["m_fromlist"][]=$obj;
$proto106["m_groupby"] = array();
$proto106["m_orderby"] = array();
$obj = new SQLQuery($proto106);

$queryData_packing_lists = $obj;
$tdatapacking_lists[".sqlquery"] = $queryData_packing_lists;

include(getabspath("include/packing_lists_events.php"));
$tableEvents["packing_lists"] = new eventclass_packing_lists;

?>
